home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / pack.n < prev    next >
Text File  |  1995-07-25  |  18KB  |  331 lines

  1.  
  2.  
  3.  
  4.      ppppaaaacccckkkk((((nnnn))))                      TTTTkkkk (((( ))))                       ppppaaaacccckkkk((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           pack - Geometry manager that packs around edges of cavity
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ppppaaaacccckkkk _o_p_t_i_o_n _a_r_g ?_a_r_g ...?
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           The ppppaaaacccckkkk command is used to communicate with the  packer,  a
  20.           geometry  manager  that arranges the children of a parent by
  21.           packing them in order around the edges of the  parent.   The
  22.           ppppaaaacccckkkk command can have any of several forms, depending on the
  23.           _o_p_t_i_o_n argument:
  24.  
  25.           ppppaaaacccckkkk _s_l_a_v_e ?_s_l_a_v_e ...? ?_o_p_t_i_o_n_s?
  26.                If the first argument to ppppaaaacccckkkk is  a  window  name  (any
  27.                value   starting  with  ``.''),  then  the  command  is
  28.                processed in the same way as ppppaaaacccckkkk ccccoooonnnnffffiiiigggguuuurrrreeee.
  29.  
  30.           ppppaaaacccckkkk ccccoooonnnnffffiiiigggguuuurrrreeee _s_l_a_v_e ?_s_l_a_v_e ...? ?_o_p_t_i_o_n_s?
  31.                The arguments consist of the names of one or more slave
  32.                windows followed by pairs of arguments that specify how
  33.                to manage the slaves.   See  ``THE  PACKER  ALGORITHM''
  34.                below  for  details  on how the options are used by the
  35.                packer.  The following options are supported:
  36.  
  37.                ----aaaafffftttteeeerrrr _o_t_h_e_r
  38.                     _O_t_h_e_r must the name of another  window.   Use  its
  39.                     master  as  the  master for the slaves, and insert
  40.                     the slaves just after _o_t_h_e_r in the packing order.
  41.  
  42.                ----aaaannnncccchhhhoooorrrr _a_n_c_h_o_r
  43.                     _A_n_c_h_o_r must be a valid anchor position such  as  nnnn
  44.                     or  sssswwww;  it specifies where to position each slave
  45.                     in its parcel.  Defaults to cccceeeennnntttteeeerrrr.
  46.  
  47.                ----bbbbeeeeffffoooorrrreeee _o_t_h_e_r
  48.                     _O_t_h_e_r must the name of another  window.   Use  its
  49.                     master  as  the  master for the slaves, and insert
  50.                     the slaves just before _o_t_h_e_r in the packing order.
  51.  
  52.                ----eeeexxxxppppaaaannnndddd _b_o_o_l_e_a_n
  53.                     Specifies whether the slaves should be expanded to
  54.                     consume  extra space in their master.  _B_o_o_l_e_a_n may
  55.                     have any proper boolean value, such as  1111  or  nnnnoooo.
  56.                     Defaults to 0.
  57.  
  58.                ----ffffiiiillllllll _s_t_y_l_e
  59.                     If a slave's parcel is larger than  its  requested
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ppppaaaacccckkkk((((nnnn))))                      TTTTkkkk (((( ))))                       ppppaaaacccckkkk((((nnnn))))
  71.  
  72.  
  73.  
  74.                     dimensions, this option may be used to stretch the
  75.                     slave.  _S_t_y_l_e  must  have  one  of  the  following
  76.                     values:
  77.  
  78.                     nnnnoooonnnneeee Give the slave its requested dimensions  plus
  79.                          any internal padding requested with ----iiiippppaaaaddddxxxx or
  80.                          ----iiiippppaaaaddddyyyy.  This is the default.
  81.  
  82.                     xxxx    Stretch the slave horizontally  to  fill  the
  83.                          entire  width  of  its  parcel  (except leave
  84.                          external padding as specified by ----ppppaaaaddddxxxx).
  85.  
  86.                     yyyy    Stretch the  slave  vertically  to  fill  the
  87.                          entire  height  of  its  parcel (except leave
  88.                          external padding as specified by ----ppppaaaaddddyyyy).
  89.  
  90.                     bbbbooootttthhhh Stretch  the  slave  both  horizontally   and
  91.                          vertically.
  92.  
  93.                ----iiiinnnn _o_t_h_e_r
  94.                     Insert the slave(s) at  the  end  of  the  packing
  95.                     order for the master window given by _o_t_h_e_r.
  96.  
  97.                ----iiiippppaaaaddddxxxx _a_m_o_u_n_t
  98.                     _A_m_o_u_n_t  specifies  how  much  horizontal  internal
  99.                     padding  to  leave  on  each side of the slave(s).
  100.                     _A_m_o_u_n_t must be a valid screen distance, such as  2222
  101.                     or ....5555cccc.  It defaults to 0.
  102.  
  103.                ----iiiippppaaaaddddyyyy _a_m_o_u_n_t
  104.                     _A_m_o_u_n_t  specifies  how  much   vertical   internal
  105.                     padding  to  leave  on  each side of the slave(s).
  106.                     _A_m_o_u_n_t  defaults to 0.
  107.  
  108.                ----ppppaaaaddddxxxx _a_m_o_u_n_t
  109.                     _A_m_o_u_n_t  specifies  how  much  horizontal  external
  110.                     padding  to  leave  on  each side of the slave(s).
  111.                     _A_m_o_u_n_t defaults to 0.
  112.  
  113.                ----ppppaaaaddddyyyy _a_m_o_u_n_t
  114.                     _A_m_o_u_n_t  specifies  how  much   vertical   external
  115.                     padding  to  leave  on  each side of the slave(s).
  116.                     _A_m_o_u_n_t defaults to 0.
  117.  
  118.                ----ssssiiiiddddeeee _s_i_d_e
  119.                     Specifies which side of the  master  the  slave(s)
  120.                     will be packed against.  Must be lllleeeefffftttt, rrrriiiigggghhhhtttt, ttttoooopppp,
  121.                     or bbbboooottttttttoooommmm.  Defaults to ttttoooopppp.
  122.  
  123.                If no ----iiiinnnn, ----aaaafffftttteeeerrrr or ----bbbbeeeeffffoooorrrreeee option is  specified  then
  124.                each  of  the slaves will be inserted at the end of the
  125.                packing list  for  its  parent  unless  it  is  already
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ppppaaaacccckkkk((((nnnn))))                      TTTTkkkk (((( ))))                       ppppaaaacccckkkk((((nnnn))))
  137.  
  138.  
  139.  
  140.                managed  by  the  packer (in which case it will be left
  141.                where it is).  If one of  these  options  is  specified
  142.                then  all  the slaves will be inserted at the specified
  143.                point.  If any of the slaves are already managed by the
  144.                geometry  manager then any unspecified options for them
  145.                retain their  previous  values  rather  than  receiving
  146.                default values.
  147.  
  148.           ppppaaaacccckkkk ffffoooorrrrggggeeeetttt _s_l_a_v_e ?_s_l_a_v_e ...?
  149.                Removes each of the _s_l_a_v_es from the packing  order  for
  150.                its  master  and unmaps their windows.  The slaves will
  151.                no longer be managed by the packer.
  152.  
  153.           ppppaaaacccckkkk nnnneeeewwwwiiiinnnnffffoooo _s_l_a_v_e
  154.                Returns  a  list  whose  elements   are   the   current
  155.                configuration  state of the slave given by _s_l_a_v_e in the
  156.                same option-value form that might be specified to  ppppaaaacccckkkk
  157.                ccccoooonnnnffffiiiigggguuuurrrreeee.   The  first  two  elements  of the list are
  158.                ``----iiiinnnn _m_a_s_t_e_r'' where  _m_a_s_t_e_r  is  the  slave's  master.
  159.                Starting  with Tk 4.0 this option will be renamed "pack
  160.                info".
  161.  
  162.           ppppaaaacccckkkk pppprrrrooooppppaaaaggggaaaatttteeee _m_a_s_t_e_r ?_b_o_o_l_e_a_n?
  163.                If _b_o_o_l_e_a_n has a true boolean value such  as  1111  or  oooonnnn
  164.                then propagation is enabled for _m_a_s_t_e_r, which must be a
  165.                window name (see ``GEOMETRY PROPAGATION''  below).   If
  166.                _b_o_o_l_e_a_n  has  a false boolean value then propagation is
  167.                disabled for _m_a_s_t_e_r.  In either of these cases an empty
  168.                string  is  returned.   If  _b_o_o_l_e_a_n is omitted then the
  169.                command returns 0000 or 1111 to indicate whether  propagation
  170.                is   currently  enabled  for  _m_a_s_t_e_r.   Propagation  is
  171.                enabled by default.
  172.  
  173.           ppppaaaacccckkkk ssssllllaaaavvvveeeessss _m_a_s_t_e_r
  174.                Returns a list of all of  the  slaves  in  the  packing
  175.                order  for _m_a_s_t_e_r.  The order of the slaves in the list
  176.                is the same as their order in the  packing  order.   If
  177.                _m_a_s_t_e_r has no slaves then an empty string is returned.
  178.  
  179.  
  180.      TTTTHHHHEEEE PPPPAAAACCCCKKKKEEEERRRR AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMM
  181.           For each master the packer  maintains  an  ordered  list  of
  182.           slaves  called  the  _p_a_c_k_i_n_g  _l_i_s_t.   The  ----iiiinnnn,  ----aaaafffftttteeeerrrr, and
  183.           ----bbbbeeeeffffoooorrrreeee configuration options are used to specify the master
  184.           for each slave and the slave's position in the packing list.
  185.           If none of these options is given for a slave then the slave
  186.           is added to the end of the packing list for its parent.
  187.  
  188.           The packer arranges the slaves for a master by scanning  the
  189.           packing list in order.  At the time it processes each slave,
  190.           a rectangular area within the master is  still  unallocated.
  191.           This  area  is called the _c_a_v_i_t_y;  for the first slave it is
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 7/23/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ppppaaaacccckkkk((((nnnn))))                      TTTTkkkk (((( ))))                       ppppaaaacccckkkk((((nnnn))))
  203.  
  204.  
  205.  
  206.           the entire area of the master.
  207.  
  208.           For each slave the packer carries out the following steps:
  209.  
  210.           [1]  The packer allocates a rectangular _p_a_r_c_e_l for the slave
  211.                along the side of the cavity given by the slave's ----ssssiiiiddddeeee
  212.                option.  If the side is top or bottom then the width of
  213.                the parcel is the width of the cavity and its height is
  214.                the requested height of the slave plus the  ----iiiippppaaaaddddyyyy  and
  215.                ----ppppaaaaddddyyyy  options.   For the left or right side the height
  216.                of the parcel is the height of the cavity and the width
  217.                is the requested width of the slave plus the ----iiiippppaaaaddddxxxx and
  218.                ----ppppaaaaddddxxxx options.  The  parcel  may  be  enlarged  further
  219.                because of the ----eeeexxxxppppaaaannnndddd option (see ``EXPANSION'' below)
  220.  
  221.           [2]  The packer chooses the dimensions of  the  slave.   The
  222.                width will normally be the slave's requested width plus
  223.                twice its ----iiiippppaaaaddddxxxx option and the height will normally be
  224.                the  slave's  requested  height  plus  twice its ----iiiippppaaaaddddyyyy
  225.                option.  However, if the ----ffffiiiillllllll option is xxxx or bbbbooootttthhhh then
  226.                the width of the slave is expanded to fill the width of
  227.                the parcel, minus twice the ----ppppaaaaddddxxxx option.  If the ----ffffiiiillllllll
  228.                option  is  yyyy  or  bbbbooootttthhhh then the height of the slave is
  229.                expanded to fill the width of the parcel,  minus  twice
  230.                the ----ppppaaaaddddyyyy option.
  231.  
  232.           [3]  The packer positions the slave over its parcel.  If the
  233.                slave  is  smaller  than  the  parcel  then the ----aaaannnncccchhhhoooorrrr
  234.                option determines where in the parcel the slave will be
  235.                placed.   If ----ppppaaaaddddxxxx or ----ppppaaaaddddyyyy is non-zero, then the given
  236.                amount of external padding will always be left  between
  237.                the slave and the edges of the parcel.
  238.  
  239.           Once a given slave has been packed, the area of  its  parcel
  240.           is subtracted from the cavity, leaving a smaller rectangular
  241.           cavity for the next slave.  If a slave doesn't  use  all  of
  242.           its  parcel, the unused space in the parcel will not be used
  243.           by subsequent slaves.  If the cavity should become too small
  244.           to  meet  the  needs of a slave then the slave will be given
  245.           whatever space is left in the cavity.  If the cavity shrinks
  246.           to  zero size, then all remaining slaves on the packing list
  247.           will be unmapped from the screen  until  the  master  window
  248.           becomes large enough to hold them again.
  249.  
  250.  
  251.      EEEEXXXXPPPPAAAANNNNSSSSIIIIOOOONNNN
  252.           If a master window is so large  that  there  will  be  extra
  253.           space  left  over  after all of its slaves have been packed,
  254.           then the extra space is distributed uniformly among  all  of
  255.           the  slaves  for  which  the  ----eeeexxxxppppaaaannnndddd  option is set.  Extra
  256.           horizontal space is distributed among the expandable  slaves
  257.           whose  ----ssssiiiiddddeeee  is  lllleeeefffftttt or rrrriiiigggghhhhtttt, and extra vertical space is
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 7/23/95)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      ppppaaaacccckkkk((((nnnn))))                      TTTTkkkk (((( ))))                       ppppaaaacccckkkk((((nnnn))))
  269.  
  270.  
  271.  
  272.           distributed among the expandable slaves whose ----ssssiiiiddddeeee  is  ttttoooopppp
  273.           or bbbboooottttttttoooommmm.
  274.  
  275.  
  276.      GGGGEEEEOOOOMMMMEEEETTTTRRRRYYYY PPPPRRRROOOOPPPPAAAAGGGGAAAATTTTIIIIOOOONNNN
  277.           The packer normally computes how large a master must  be  to
  278.           just  exactly  meet the needs of its slaves, and it sets the
  279.           requested  width  and  height  of  the   master   to   these
  280.           dimensions.   This  causes geometry information to propagate
  281.           up through a window hierarchy to a top-level window so  that
  282.           the  entire  sub-tree  sizes  itself to fit the needs of the
  283.           leaf windows.  However, the ppppaaaacccckkkk pppprrrrooooppppaaaaggggaaaatttteeee  command  may  be
  284.           used  to  turn  off propagation for one or more masters.  If
  285.           propagation is disabled then the packer  will  not  set  the
  286.           requested  width  and  height  of  the  packer.  This may be
  287.           useful if, for example, you wish for a master window to have
  288.           a fixed size that you specify.
  289.  
  290.  
  291.      RRRREEEESSSSTTTTRRRRIIIICCCCTTTTIIIIOOOONNNNSSSS OOOONNNN MMMMAAAASSSSTTTTEEEERRRR WWWWIIIINNNNDDDDOOOOWWWWSSSS
  292.           The master for each slave must either be the slave's  parent
  293.           (the  default)  or a descendant of the slave's parent.  This
  294.           restriction is necessary to guarantee that the slave can  be
  295.           placed  over  any part of its master that is visible without
  296.           danger of the slave being clipped by its parent.
  297.  
  298.  
  299.      PPPPAAAACCCCKKKKIIIINNNNGGGG OOOORRRRDDDDEEEERRRR
  300.           If the master for a slave is not its parent  then  you  must
  301.           make  sure  that  the  slave is higher in the stacking order
  302.           than the master.  Otherwise  the  master  will  obscure  the
  303.           slave  and it will appear as if the slave hasn't been packed
  304.           correctly.  The easiest way to make sure the slave is higher
  305.           than  the  master is to create the master window first:  the
  306.           most recently created window will be highest in the stacking
  307.           order.   Or,  you  can  use  the rrrraaaaiiiisssseeee and lllloooowwwweeeerrrr commands to
  308.           change the stacking order of either the master or the slave.
  309.  
  310.  
  311.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  312.           geometry manager,  location,  packer,  parcel,  propagation,
  313.           size
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 7/23/95)
  328.  
  329.  
  330.  
  331.